﻿<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="perm" uri="/WEB-INF/tld/perm.tld"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<script>
	var ctx = "${ctx}";
</script>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>评论管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
	<meta http-equiv="expires" content="Wed, 26 Feb 209908:21:57 GMT"> 
   
	<link href="${ctx}/static/css/bootstrap.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/font-awesome.min.css?v=4.4.0?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/animate.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/style.min.css?v=${static_version}" rel="stylesheet" />
	<link href="${ctx}/static/css/common.css?v=${static_version}" rel="stylesheet" />
	<link href="//at.alicdn.com/t/font_9x03jhokyws9vn29.css" rel="stylesheet">
	<!-- Data Tables -->
	<link href="${ctx}/static/css/plugins/dataTables/dataTables.bootstrap.css?v=${static_version}" rel="stylesheet" />
    
</head>
<body class="gray-bg">
	<!-- <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>   <span class="c-gray en">&gt;</span> U_article_reply管理 
		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px" onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
        <a class="btn btn-primary radius r mr-20" style="margin-top: 3px" onclick="u_article_reply_add('添加U_article_reply','%=path%>/backstage/u_article_reply-add-pre')" href="javascript:;">
			<i class="Hui-iconfont">&#xe600;</i> 添加U_article_reply</a>
	</nav> -->
			<div class="wrapper wrapper-content animated fadeInRight">
		<!-- 	<div class="ibox float-e-margins">
			<div class="ibox-content"> -->
					<div class="row" >	
						<form action="" method="get" class="form form-horizontal" id="">
				<!-- <div class="col-md-3">
						<label class="col-md-4 col-sm-4 control-label">头条标题：</label>
						<div class="col-md-8 col-sm-8">
							<input type="text" name="reply_content" value="" id="rid" placeholder="头条标题" class="form-control">
						</div>
					</div>
					
					<div class="col-md-5">		
						<label class="col-md-3 col-sm-3 control-label">时间段：</label>
						<div class="col-md-9 col-sm-9">
							<div class="input-daterange input-group">
								<input id="startTime" name="startTime" type="text" class="input-md form-control layer-date" placeholder="开始时间" onclick="new WdatePicker()"> <span class="input-group-addon">至</span>
								<input id="endTime" name="endTime" type="text" class="input-md form-control layer-date" placeholder="结束时间" onclick="new WdatePicker()">
							</div>
						
						</div>	
						
						
					</div>
					
					<div class="col-md-3">	
						<label class="col-md-4 col-sm-4 control-label">用户名：</label>
						<div class="col-md-8 col-sm-8">
						<input type="text" name="user_name" value="" id="rid" placeholder="用户名" class="form-control">
							</select>
						</span>
					</div>
					<div class="col-md-1 col-sm-1" style="float:right">
						<button name="" id="" class="btn btn-primary fr"
						style="border-radius: 5px; float: right;" type="submit">
						查询</button> -->
				
					</div>
			<!-- 	</div>
			
			</div> -->
			
			
		</form>
	</div>
	<div class="pd-20">
	<!-- 	<div class="cl pd-5 bg-1 bk-gray"> 
			<span class="l"> 
			</span>
		 </div>
 -->
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="40">ID</th>
                            <th >评论人</th>
                            <th >发布人</th>
                            <th width="100">回复内容</th>
                            <th>发表时间</th>
                            <th >状态</th>	
							<th >操作</th>
					</tr>
				</thead>
				<tbody>
						<c:forEach items="${u_article_replys}" var="u_article_reply">	
						<tr class="text-c">
							<input type="hidden" id="id" name="id" value='${u_article_reply.id}' /> 
                            <td>${u_article_reply.id}</td>  
                            <td>${u_article_reply.to_uname}</td>                         
                                <td>${u_article_reply.user_name}</td>
                                <td>${u_article_reply.reply_content}</td>
                                <td>${u_article_reply.add_time}</td>           
                                <td>
                                <c:if test="${u_article_reply.is_delete==0}">
                                未删除
                                </c:if>
                                <c:if test="${u_article_reply.is_delete==1}">
                                已删除
                                </c:if>
                                </td>                     
						<td class="td-manage">
							<%-- <a style="text-decoration:none"
								onClick="u_article_reply_edit(this,'${u_article_reply.id}')" href="javascript:void(0);"
								title="编辑">编辑</a>
								&nbsp;&nbsp;&nbsp;&nbsp; --%>
								<a style="text-decoration:none"
								onClick="u_article_reply_delete(this,'${u_article_reply.id}')" href="javascript:void(0);"
								title="删除">删除</a>
							</td> 
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	</div>
	</div>
	<script src="${ctx}/static/js/jquery.min.js"></script>
	<script src="${ctx}/static/js/bootstrap.min.js"></script>

	<!-- 插件脚本 -->
	<script src="${ctx}/static/js/plugins/layer/layer.js"></script>	
	<script src="${ctx}/static/js/jquery.form.js"></script>
	<script src="${ctx}/static/js/plugins/webuploader/webuploader.min.js"></script>
	<script src="${ctx}/static/js/plugins/validate/jquery.validate.min.js"></script>
	<script src="${ctx}/static/js/Validform/5.3.2/Validform.min.js"></script>
	<script src="${ctx}/static/js/plugins/dataTables/jquery.dataTables.js"></script>
	<script src="${ctx}/static/js/plugins/dataTables/dataTables.bootstrap.js"></script>	
	<script type="text/javascript" src="${ctx}/static/js/plugins/markdown/markdown.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/plugins/markdown/to-markdown.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/plugins/markdown/bootstrap-markdown.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/plugins/markdown/bootstrap-markdown.zh.js"></script>
    <script type="text/javascript" charset="utf-8"src="${ctx}/static/js/ueditor/1.4.3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8"src="${ctx}/static/js/ueditor/1.4.3/ueditor.all.min.js"> </script>
<script src="${ctx}/static/js/My97DatePicker/WdatePicker.js?v=${static_version}"></script>
	<script type="text/javascript">
		$(function() {
			$('.table-sort').dataTable({
				"aaSorting" : [ [ 0, "desc" ] ],//默认第几个排序
				"bStateSave" : true,//状态保存
				"aoColumnDefs" : [
				//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
				{
					"orderable" : false,
					"aTargets" : [ 1, 2 ]
				} // 制定列不参与排序
				]
			});
			$('.table-sort tbody').on('click', 'tr', function() {
				if ($(this).hasClass('selected')) {
					$(this).removeClass('selected');
				} else {
					table.$('tr.selected').removeClass('selected');
					$(this).addClass('selected');
				}
			});
		});

		/*添加*/
		function u_article_reply_add(title, url, w, h) {
			layer_show(title, url, w, h);
		}

	/*编辑*/
		/* 
		function u_article_reply_edit(obj,id,w,h){
			var edit_page = "${ctx}/article/u_article_reply-add-pre?id="+id;
			var index = layer.open({
				type: 2,
				title: "编辑",
				content: edit_page
			});
			layer.full(index);
		} */

		/*删除*/
		function u_article_reply_delete(obj,id){
			layer.confirm('确认删除？', {
				btn: ['确认','取消'], 
				shade: false
			},
			function(){
								$.ajax({
					type : "POST",
					url : "${ctx}/article/u_article_reply-delete",
					data : "id=" + id,
					error : function() {
						layer.msg('操作失败', {icon:5,time:1000});
					},
					success : function(msg) {
						layer.msg('已删除 ' + msg.information, {icon:6,time:1000});
						$(obj).parents("body").find(".btn-refresh").click();
					}
				});
			},
			function(){
				layer.msg('未删除', {icon:5,time:1000});
			});	
		}
	</script>
</body>
</html>



